package framework.common.zanetwork;

import com.alibaba.sdk.android.oss.ClientConfiguration;
import com.alibaba.sdk.android.oss.OSS;
import com.alibaba.sdk.android.oss.OSSClient;
import com.alibaba.sdk.android.oss.common.OSSLog;
import com.alibaba.sdk.android.oss.common.auth.OSSCredentialProvider;
import com.alibaba.sdk.android.oss.common.auth.OSSPlainTextAKSKCredentialProvider;

/**
 * Created by wq on 2016/7/5.
 */
public class UeHttpUrl {

    // 远程环境
    public static String SERVER_IP = "59.110.170.249";
    public static String SERVER_PORT = "9011";
    // 本地环境
    public static String LOCALSERVER_IP = "192.168.199.107";
    public static String LOCALSERVER_PORT = "8080";

    public static String about="http://59.110.170.249/repairHtml/aboutus.html";//（关于我们）
    public static String fuwu="http://59.110.170.249/repairHtml/service.html";//（服务说明）
    public static String yinsi="http://59.110.170.249/repairHtml/privacy.html";//（隐私协议）
    // 生产环境
      public static String MODEL = "PRD";
    // 开发环境
	//public static String MODEL = "DEV";
    static {
        if (MODEL.equals("DEV")) {
            SERVER_IP = LOCALSERVER_IP;
            SERVER_PORT = LOCALSERVER_PORT;
        }
    }


    // 获取数据请求URL
    public static String BaseHttpUrl() {
        if (SERVER_PORT == null || "".equals(SERVER_PORT)) {
            return "http://" + SERVER_IP + "/";
        } else {
            return "http://" + SERVER_IP + ":" + SERVER_PORT + "/lr/";
        }
    }
    public static String getImgaes(){
        return BaseHttpUrl()+"images/";
    }


    /**
     * 添加地址
     * @return
     */
    public static String expressAddressAdd(){
        return BaseHttpUrl()+"clientUserAddress/expressAddressAdd";
    }
    /**
     * 根据token获取用户基本信息
     * @return
     */
    public static String userById(){
        return BaseHttpUrl()+"companyUser/userById";
    }
    /**
     * 更新用户信息
     * @return
     */
    public static String userByIdUpdate(){
        return BaseHttpUrl()+"companyUser/userByIdUpdate";
    }
    /**
     * 更新设备图片信息
     * @return
     */
    public static String deviceUpdateImg(){
        return BaseHttpUrl()+"device/deviceUpdateImg";
    }
    /**
     * 获取工具箱列表
     * @return
     */
    public static String commonToolList(){
        return BaseHttpUrl()+"device/commonToolList";
    }
    /**
     * 借用工具箱列表
     * @return
     */
    public static String toolUseList(){
        return BaseHttpUrl()+"device/toolUseList";
    }
    /**
     * 工具箱列表
     * @return
     */
    public static String toolBoxList(){
        return BaseHttpUrl()+"device/toolBoxList";
    }
    /**
     * 手机端更换手机号
     * @return
     */
    public static String putTel(){
        return BaseHttpUrl()+"user/putTel";
    }

    /**
     * 获取设备台账
     * @return
     */
    public static String deviceList(){
        return BaseHttpUrl()+"device/deviceCheckList";
    }
    /**
     * 我负责的设备台账
     * @return
     */
    public static String myDeviceList(){
        return BaseHttpUrl()+"device/list";
    }
    /**
     * 首页获取设备维修列表详情
     * @return
     */
    public static String deviceCheckInfo(){
        return BaseHttpUrl()+"device/deviceCheckInfo";
    }
    /**
     * 个人中心保养、检查任务列表
     * @return
     */
    public static String centerCheckMainList(){
        return BaseHttpUrl()+"companyUser/centerCheckMainList";
    }
    /**
     * 根据设备id获取保养项
     * @return
     */
    public static String maintenancekByDeviceId(){
        return BaseHttpUrl()+"products/maintenancekByDeviceId";
    }
    /**
     * 提交设备保养结果
     * @return
     */
    public static String updateMaintenancekByDeviceId(){
        return BaseHttpUrl()+"products/updateMaintenancekByDeviceId";
    }
    /**
     * 根据设备id获取检查项
     * @return
     */
    public static String checkByDeviceId(){
        return BaseHttpUrl()+"products/checkByDeviceId";
    }
    /**
     * 提交设备检查结果
     * @return
     */
    public static String updateCheckByDeviceId(){
        return BaseHttpUrl()+"products/updateCheckByDeviceId";
    }
    /**
     * 首页获取设备保养列表
     * @return
     */
    public static String deviceMaintenanceList(){
        return BaseHttpUrl()+"device/deviceMaintenanceList";
    }
    /**
     * 首页获取设备保养列表详情
     * @return
     */
    public static String deviceMaintenanceInfo(){
        return BaseHttpUrl()+"device/deviceMaintenanceInfo";
    }
    /**
     * 首页获取保养列表详情
     * @return
     */
    public static String taskByState(){
        return BaseHttpUrl()+"products/taskByState";
    }
    /**
     * 设备保养发布
     * @return
     */
    public static String deviceMaintenancePush(){
        return BaseHttpUrl()+"device/deviceMaintenancePush";
    }
    /**
     * 设备检查发布
     * @return
     */
    public static String deviceCheckPush(){
        return BaseHttpUrl()+"device/deviceCheckPush";
    }
    /**
     * 获取业务执行列表
     * @return
     */
    public static String deviceBusinessList(){
        return BaseHttpUrl()+"device/businessList";
    }
    /**
     * 获取业务执行回复列表
     * @return
     */
    public static String businessRreplyList(){
        return BaseHttpUrl()+"device/businessRreplyList";
    }
    /**
     * 业务执行操作
     * @return
     */
    public static String businessOperation(){
        return BaseHttpUrl()+"device/businessOperation";
    }
    /**
     * 获取用户推送开关
     * @return
     */
    public static String userPushSetList(){
        return BaseHttpUrl()+"companyUser/userPushSetList";
    }
    /**
     * 设置用户推送开关
     * @return
     */
    public static String userPushSetUpdate(){
        return BaseHttpUrl()+"companyUser/userPushSetUpdate";
    }


    /**
     * 获取收货地址
     * @return
     */
    public static String expressAddressList(){
        return BaseHttpUrl()+"clientUserAddress/expressAddressList";
    }
    /**
     * 修改默认收货地址
     * @return
     */
    public static String expressAddressState(){
        return BaseHttpUrl()+"clientUserAddress/expressAddressState";
    }
    /**
     * 修改默认收货地址
     * @return
     */
    public static String expressAddressDel(){
        return BaseHttpUrl()+"clientUserAddress/expressAddressDel";
    }
    /**
     * 根据省市获取代理商
     * @return
     */
    public static String agency (){
        return BaseHttpUrl()+"agency/list";
    }
    /**
     * 扫码获取设备信息
     * @return
     */
    public static String deviceByTwoCode (){
        return BaseHttpUrl()+"device/deviceByTwoCode";
    }
    /**
     * 一键报修
     * @return
     */
    public static String oneKeys (){
        return BaseHttpUrl()+"device/oneKeys";
    }
    /**
     * 维修提交
     * @return
     */
    public static String repairSubmit(){
        return BaseHttpUrl()+"products/repairSubmit";
    }
    /**
     * 借用
     * @return
     */
    public static String toolUse (){
        return BaseHttpUrl()+"device/toolUse";
    }

    /**
     * 首页
     * @return
     */
    public static String index(){
        return "http://59.110.170.249:9013/cym_back/app/store/goods/index";
    }
    /**
     * 用户退货换货列表
     * @return
     */
    public static String findUserReturnOrder(){
        return BaseHttpUrl()+"app/store/carownerSalesReturnOrder/findUserReturnOrder";
    }
}
